<?php

namespace App\Http\Controllers;

use App\Model\Banner;
use Illuminate\Http\Request;
use App\Http\Resources\Banner as BannerResource;

class BannerController extends ApiController
{
    //
    public function getList(Request $request){
        $page = $request->get('page',1);
        $size = $request->get('size',10);

        $data = Banner::query()->offset(($page-1)*$size)->limit($size)->get();


        return $this->success(BannerResource::collection($data));
    }
}
